package week_home_work02;

import java.util.Scanner;

/**
 * @author zdl
 * @date 2024/11/22
 */
public class Demo38 {
    public static void main(String[] args) {
        //实现一个计算正整数n的约数的个数的程序。
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数:");
        int num = sc.nextInt();
        int count = 0;
        for (int i = 1; i <=num ; i++) {
            if (num % i == 0){
                System.out.print(i+"\t");
                count++;
            }

        }
        System.out.println();
        System.out.println(count);
    }
}
